package csu.web.mypetstore.utils;

import com.fasterxml.jackson.databind.ObjectMapper;

public class ResultToJson {

    private static final ObjectMapper objectMapper = new ObjectMapper();

    public static void convertResultToJson(Object result) {
      try{
          String jsonResult = objectMapper.writeValueAsString(result);
          System.out.println(jsonResult);
      }catch(Exception e){
          e.printStackTrace();
      }

    }

}
